package com.zhudi.develop_demo_as.entity.parser;

import com.google.gson.reflect.TypeToken;
import com.zhudi.develop_demo_as.JsonObjectParser;
import com.zhudi.develop_demo_as.entity.ModelTest;

import org.json.JSONException;

import java.util.ArrayList;
import java.util.List;


public class ModelTestParser implements JsonObjectParser {

    @Override
    public Object parse(String json) throws JSONException {
       // String result = json.getString("invitationRanks");
        ArrayList<Object> list = new ArrayList<Object>();
        list = gson.fromJson(json, new TypeToken<List<ModelTest>>() { }.getType());
        return list;
    }

}
